﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="consultarEvento.aspx.cs" Inherits="Finalcountdown.Evento.Consultar.consultarEvento" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="updPanel" runat="server">
        <ContentTemplate>
            <div id="page-wrapper">
		        <div id="main-wrapper">
			        <div id="main-content">
                        <asp:HiddenField ID="hdfIdEventoRemover" runat="server"></asp:HiddenField>
                
				        <div class="title title-spacing">
					        <h2>Eventos</h2>
                            Consulta de eventos.
				        </div>
               
                        <div class="response-msg success ui-corner-all" runat="server" id="divMsnPesquisaSucesso" visible="false">
					        <span>Sucesso!</span>
					        <asp:Label ID="lblNumEncontrados" runat="server" Text="" />.
				        </div>
                         <div class="response-msg success ui-corner-all" runat="server" id="divMsnExclusaoSucesso" visible="false">
					        <span>Sucesso!</span>
					        Registro excluido com sucesso.
				        </div>
                        <div class="response-msg notice ui-corner-all" runat="server" id="divMsnPesquisaAtencao" visible="false">
					        <span>Atenção!</span>
					        Não foram encontrados nenhum registro com essas informações.
				        </div>
                         <div style="height:30px;">
                            <asp:LinkButton ID="lnk" CssClass="btn ui-state-default ui-corner-all" 
                                                runat="server" onclick="lnk_Click" ><span class="ui-icon ui-icon-plus"></span>Novo</asp:LinkButton>
                        </div>
                        <div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					        <div class="portlet-header ui-widget-header">Pesquisa</div>
					        <div class="portlet-content">
					            <ul>
						            <li>
							            <label  class="desc">
								            Nome do Evento
							            </label>
							            <div>
                                            <asp:TextBox ID="txtNmEvento" MaxLength="255" CssClass="field text small" runat="server" Text=""></asp:TextBox>
							            </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Data Evento
							            </label>
                                        <div>
                                            <asp:TextBox ID="txtDtEvento" MaxLength="255" Width="70px" CssClass="field text small" runat="server" Text=""></asp:TextBox>
                                            <asp:MaskedEditExtender ID="mask_txtDtEvento" MaskType="Date" Mask="99/99/9999" TargetControlID="txtDtEvento" ClearMaskOnLostFocus="false"  runat="server">
                                            </asp:MaskedEditExtender>
							            </div>
						            </li>
                                    <li>
                                        <label  class="desc">
								            Status
							            </label>
                                        <div>
                                            <asp:DropDownList ID="ddlStatus" DataValueField="id_status" DataTextField="ds_status" runat="server" CssClass="field">
                                            </asp:DropDownList>
                                        </div>
                                    </li>
                                    <li class="buttons">
                                        <div>
				                            <asp:LinkButton ID="lkbPesquisar" CssClass="btn ui-state-default ui-corner-all" 
                                                runat="server" onclick="lkbPesquisar_Click"><span class="ui-icon ui-icon-search"></span>Pesquisar</asp:LinkButton>
			                            </div>
							        </li>
                                </ul>
                            </div>
                        </div>
				        <div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all form-container">
					        <div class="portlet-header ui-widget-header">Resultado da Pesquisa</div>
					        <div class="portlet-content">
                                <div>
                                    <asp:GridView ID="grdResEvento" runat="server" AutoGenerateColumns="False" 
                                        onrowcommand="grdResEvento_RowCommand" 
                                        onpageindexchanging="grdResEvento_PageIndexChanging" BackColor="White" 
                                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                                        Width="100%"  ForeColor="Black" GridLines="Vertical" 
                                        onrowdatabound="grdResEvento_RowDataBound" >
                                        <Columns>
                                            <asp:BoundField DataField="nm_evento" HeaderText="Nome" >
                                                <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="dt_evento" HeaderText="Data do Evento" >
                                                <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                            </asp:BoundField>
                                             <asp:BoundField DataField="nr_status" HeaderText="Tipo Usuário" >
                                                <ItemStyle CssClass="bdGrid" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1" />
                                            </asp:BoundField>
                                            <asp:TemplateField>
                                                <ItemStyle Width="100px" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1"/>
                                                <ItemTemplate>
                                                    <asp:linkbutton ID="LkbEditar" CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip"  text="" runat="server" CommandName="editar" CommandArgument='<%# Eval("id_evento")%>'><span class="ui-icon ui-icon-wrench" title="Editar"></span></asp:linkbutton>
                                                    <asp:linkbutton ID="LkbRemover" CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip"  text="" runat="server" CommandName="remover" CommandArgument='<%# Eval("id_evento")%>'><span class="ui-icon ui-icon-trash" title="Remover"></span></asp:linkbutton>
                                                    <asp:linkbutton ID="LkbAcompanhar" CssClass="btn_no_text btn ui-state-default ui-corner-all tooltip"  text="" runat="server" CommandName="acompanhar" CommandArgument='<%# Eval("id_evento")%>'><span class="ui-icon ui-icon-clock" title="Acompanhar Evento"></span></asp:linkbutton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <HeaderStyle CssClass="headerGrid" />
                                        <RowStyle  CssClass="trGrid" />
                                        <PagerStyle CssClass="trPager" />
                                    </asp:GridView>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Área de Validação abaixo -->
            <div style="display:none;">
                <asp:HyperLink ID="linkMsn" runat="server">HyperLink</asp:HyperLink>
            </div>
            <asp:ModalPopupExtender ID="ModalPopupRemover" TargetControlID="linkMsn" runat="server"
                PopupControlID="PainelMsn" CancelControlID="btnCancelarMsn" BackgroundCssClass="modalBackground">
            </asp:ModalPopupExtender>
            <asp:Panel ID="PainelMsn" runat="server" Style="display: none; padding-bottom:15px;" Width="350px" CssClass="modalPopup">
                <asp:Panel ID="PainelCabecalho" runat="server" Style="height: 25px;">
                    <div>
                        <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" style="font-size: 10px">
                            <span class="ui-dialog-title" id="ui-dialog-title-login">
                                Atenção
                            </span> 
                        </div>
                        <div style="text-align:center">
                            <b><p>Deseja remover esse Evento?</p></b>
                            <div style="float: right; padding-top:10px;padding-right:5px">
                                <asp:LinkButton ID="lkbSim" CssClass="btn ui-state-default ui-corner-all" 
                                    runat="server" OnClick="lkbSim_Click" ><span class="ui-icon ui-icon-check"></span>Sim</asp:LinkButton>
			                    <asp:LinkButton ID="lkbNao" CssClass="btn ui-state-default ui-corner-all" 
                                    runat="server" OnClick="lkbNao_Click" ><span class="ui-icon ui-icon-cancel"></span>Não</asp:LinkButton>
                            </div>
                            <div style="display:none;">
                                     <asp:Button ID="btnCancelarMsn" Text="" runat="server" />
                                </div>
                        </div>
                    </div>
                </asp:Panel>
            </asp:Panel>
            <!-- Final Área de Validação -->
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
